<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="bnsArticleList" checkbox="true" fitColumns="false" title="文章表" actionUrl="bnsArticleController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="标题"  field="title"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="内容"  field="content"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="区域"  field="areaId"   query="true" queryMode="single" dictionary="area_info,id,area_name"  width="120"></t:dgCol>
   <t:dgCol title="版块"  field="groupId"   query="true" queryMode="single" dictionary="article_group_info,id,article_group_name"  width="120"></t:dgCol>
   <t:dgCol title="主题"  field="themeId"   query="true" queryMode="single" dictionary="bns_theme,id,theme_name"  width="120"></t:dgCol>
   <t:dgCol title="文章标签"  field="articleLabel"    queryMode="single" dictionary="artLab" width="120"></t:dgCol>
   <t:dgCol title="发布人"  field="createName"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="发布时间"  field="createDate" formatter="yyyy-MM-dd hh:mm:ss"  query="true" queryMode="single"   width="120"></t:dgCol>
   <t:dgCol title="发布状态"  field="publisherStates"   query="true" queryMode="single" dictionary="pbsSta" width="120"></t:dgCol>
   <t:dgCol title="评论数量"  field="commentsNum"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="浏览数量"  field="browseNum"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="置顶"  field="isUp"   query="true" queryMode="single" dictionary="sf_yn" width="120"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgDelOpt title="删除" url="bnsArticleController.do?doDel&id={id}" />
   <t:dgFunOpt title="查看评论"  funname="showCommont(id,title)" />
   <t:dgToolBar title="录入" icon="icon-add" url="bnsArticleController.do?goAdd" funname="add" width="800" height="655"></t:dgToolBar>
   <t:dgToolBar title="编辑" icon="icon-edit" url="bnsArticleController.do?goUpdate" funname="update"  width="800" height="690"></t:dgToolBar>
   <t:dgToolBar title="批量删除"  icon="icon-remove" url="bnsArticleController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
   <t:dgToolBar title="查看" icon="icon-search" url="bnsArticleController.do?goUpdate" funname="detail" width="800" height="690"></t:dgToolBar>
<%--    <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  </t:datagrid>
  </div>
 </div>
 <script src = "webpage/com/buss/article/bnsArticleList.js"></script>		
 <script type="text/javascript">
 $(document).ready(function(){
 		//给时间控件加上样式
 			$("#bnsArticleListtb").find("input[name='createDate_begin']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 			$("#bnsArticleListtb").find("input[name='createDate_end']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 });
 
//弹窗显示评论列表
 function showCommont(id,title){
 	$.dialog({
          content: "url:bnsArticleCommentsController.do?list&artId="+id,
          lock : true,
          title:"评论："+title,
          zIndex:2100,
          width:765,
          height: 500,
          parent:windowapi,
          cache:false
  	});
 	//alert("弹出评论列表"+id);
 	
 }
 
// //导入
// function ImportXls() {
// 	openuploadwin('Excel导入', 'bnsArticleController.do?upload', "bnsArticleList");
// }

// //导出
// function ExportXls() {
// 	JeecgExcelExport("bnsArticleController.do?exportXls","bnsArticleList");
// }

// //模板下载
// function ExportXlsByT() {
// 	JeecgExcelExport("bnsArticleController.do?exportXlsByT","bnsArticleList");
// }
 </script>